\(\int \frac {a+b \sec (c+d \sqrt {x})}{\sqrt {x}} \, dx\) [53]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 26 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x}+\frac {2 b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d} \]

[Out]

2*b*arctanh(sin(c+d*x^(1/2)))/d+2*a*x^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {14, 4289, 3855} \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x}+\frac {2 b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d} \]

[In]

Int[(a + b*Sec[c + d*Sqrt[x]])/Sqrt[x],x]

[Out]

2*a*Sqrt[x] + (2*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4289

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a}{\sqrt {x}}+\frac {b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}}\right ) \, dx \\ & = 2 a \sqrt {x}+b \int \frac {\sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx \\ & = 2 a \sqrt {x}+(2 b) \text {Subst}\left (\int \sec (c+d x) \, dx,x,\sqrt {x}\right ) \\ & = 2 a \sqrt {x}+\frac {2 b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x}+\frac {2 b \text {arctanh}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d} \]

[In]

Integrate[(a + b*Sec[c + d*Sqrt[x]])/Sqrt[x],x]

[Out]

2*a*Sqrt[x] + (2*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.23

method result size
derivativedivides \(2 a \sqrt {x}+\frac {2 b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)
default \(2 a \sqrt {x}+\frac {2 b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)
parts \(2 a \sqrt {x}+\frac {2 b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}\) \(32\)

[In]

int((a+b*sec(c+d*x^(1/2)))/x^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*a*x^(1/2)+2*b/d*ln(sec(c+d*x^(1/2))+tan(c+d*x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.58 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=\frac {2 \, a d \sqrt {x} + b \log \left (\sin \left (d \sqrt {x} + c\right ) + 1\right ) - b \log \left (-\sin \left (d \sqrt {x} + c\right ) + 1\right )}{d} \]

[In]

integrate((a+b*sec(c+d*x^(1/2)))/x^(1/2),x, algorithm="fricas")

[Out]

(2*a*d*sqrt(x) + b*log(sin(d*sqrt(x) + c) + 1) - b*log(-sin(d*sqrt(x) + c) + 1))/d

Sympy [A] (verification not implemented)

Time = 1.24 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.23 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 a \sqrt {x} + 2 b \left (\begin {cases} \frac {\sqrt {x} \left (\tan {\left (c \right )} \sec {\left (c \right )} + \sec ^{2}{\left (c \right )}\right )}{\tan {\left (c \right )} + \sec {\left (c \right )}} & \text {for}\: d = 0 \\\frac {\log {\left (\tan {\left (c + d \sqrt {x} \right )} + \sec {\left (c + d \sqrt {x} \right )} \right )}}{d} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((a+b*sec(c+d*x**(1/2)))/x**(1/2),x)

[Out]

2*a*sqrt(x) + 2*b*Piecewise((sqrt(x)*(tan(c)*sec(c) + sec(c)**2)/(tan(c) + sec(c)), Eq(d, 0)), (log(tan(c + d*
sqrt(x)) + sec(c + d*sqrt(x)))/d, True))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.19 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2 \, a \sqrt {x} + \frac {2 \, b \log \left (\sec \left (d \sqrt {x} + c\right ) + \tan \left (d \sqrt {x} + c\right )\right )}{d} \]

[In]

integrate((a+b*sec(c+d*x^(1/2)))/x^(1/2),x, algorithm="maxima")

[Out]

2*a*sqrt(x) + 2*b*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (22) = 44\).

Time = 0.35 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.92 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=\frac {2 \, {\left ({\left (d \sqrt {x} + c\right )} a + b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) - 1 \right |}\right )\right )}}{d} \]

[In]

integrate((a+b*sec(c+d*x^(1/2)))/x^(1/2),x, algorithm="giac")

[Out]

2*((d*sqrt(x) + c)*a + b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) + 1)) - b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) - 1))
)/d

Mupad [B] (verification not implemented)

Time = 15.74 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.73 \[ \int \frac {a+b \sec \left (c+d \sqrt {x}\right )}{\sqrt {x}} \, dx=2\,a\,\sqrt {x}-\frac {2\,b\,\ln \left (\frac {b\,2{}\mathrm {i}-2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d}+\frac {2\,b\,\ln \left (\frac {b\,2{}\mathrm {i}+2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d} \]

[In]

int((a + b/cos(c + d*x^(1/2)))/x^(1/2),x)

[Out]

2*a*x^(1/2) - (2*b*log((b*2i - 2*b*exp(d*x^(1/2)*1i)*exp(c*1i))/x^(1/2)))/d + (2*b*log((b*2i + 2*b*exp(d*x^(1/
2)*1i)*exp(c*1i))/x^(1/2)))/d